package com.builder;

import com.builder.build.Meal;
import com.builder.product.burger.ChickenBurger;
import com.builder.product.burger.VegBurger;
import com.builder.product.drink.Pepsi;

public class Test {
    public static void main(String[] args) {
        Meal.Builder builder = Meal.newBuilder();
        // 放入一个蔬菜汉堡包
        builder.addItem(new ChickenBurger());
        // 放入一个鸡肉汉堡
        builder.addItem(new VegBurger());
        // 放入一瓶百事可乐
        builder.addItem(new Pepsi());
        // 打包：产生一份订单
        Meal meal = builder.build();

        // 查看购物车
        meal.showItems();
        // 输出商品总价
        System.out.println(meal.getTotalCost());
    }
}
